/********************************************/
  // Creation History
  // --------------------------------------------------------------
  //	Company:			HTHK
  //	NAME:				ProjectGroup.java
  //    Title   :			Reflect the Project Group Data Table
  //	FUNCTION:
  //	BY:				Poly Li
  //	DATE:				14/01/2004
  // --------------------------------------------------------------
/*********************************************/
// Copyright (c) 2002 HTHK

package tss.projectgroup;

import com.ffpc.sql.*;

import tss.projectgroup.ProjectGroupBean;

public class ProjectGroup
   extends DataObject
   implements ProjectGroupBean
{
   private String project_name = null;
   private String group_name = null;
   private Column ColProjectName = null;
   private Column ColGroupName = null;
   /**
    * Constructor
    */
   public ProjectGroup()
   {
       ColProjectName = new Column(0,"project_name",Column.Types.string,null,20,false);
       ColGroupName = new Column(1,"group_name",Column.Types.string,null,20,false);
   }

   // functions belongs to ProjectGroupBean interface

   @Override
public void setProject_name(String project_name)
   {       this.project_name = this.setAttribute(ColProjectName,project_name);
   }

   @Override
public String getProject_name()
   {       return this.project_name==null?"":this.project_name;
   }

   @Override
public void setGroup_name(String group_name)
   {       this.group_name = this.setAttribute(ColGroupName,group_name);
   }

   @Override
public String getGroup_name()
   {       return this.group_name==null?"":this.group_name;
   }

   // belongs to row interface

   @Override
public Column[] createColumns()
   {
       Column[] cols = new Column[2];
       cols[0] = ColProjectName.clone(null);
       cols[1] = ColGroupName.clone(null);
       return cols;
   }

   // super's abstract methods

   @Override
public String getTableName()
   {
       return "tss.tss_c_project_group";
   }

   @Override
protected String[] getKeyColumnNames()
   {
       String[] list = {
                         "project_name"
                       };
       return list;
   }

   @Override
protected String[] getUpdatableColumnNames()
   {
       String[] list = {
                         "group_name"
                       };
       return list;
   }

   @Override
protected void retrieveColumnValues()
   {
       this.project_name = this.retrieveColumnValue("project_name");
       this.group_name = this.retrieveColumnValue("group_name");
   }
}

